import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'




const routers = [
  {
    path: '/login',
    name: 'login',
    component: () =>
      import('@/views/Login.vue')
  },
  // {

  //   path: '/:pathMatch(.*)*',
  //   name: "notfound",
  //   meta: {
  //     requiresAuth: true
  //   },
  //   component: () =>
  //     import("@/views/NotFound.vue"),
  // },
]

// 动态路由
export const DynamicRoutes = [{
  path: "/",
  component: () =>
    import("@/views/layout/layout.vue"),
  name: "/",
  redirect: "user",
  children: []
},
]

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: routers
})

export default router
